var $ =require('../../lib/jquery');
var util = require('./common/util');
var nav = require('./common/nav');
var _header = require('./common/header');
var template = require('../tpl/template');
var _nav = new nav();
var header = new _header();
var minHeight = require('./common/minHeight');
minHeight.init();
var listData;
resultList();
function resultList(){
    util.fetch('api/dazx/HIPMessageServer?action=app-report&method=HIPMessageServer').then(function(res){
        listData=res.data;
        var tpl=template('bgsq_list',{data:res.data});
         $('.js_content').html(tpl)
    }).fail(function(res){
        if(res.code=='USR108'){
            $('.js_content').html('<p class="noData">暂无数据</p>')  
        }
    })
}
$('body').on('click','.js_xq',function(){
    var index =  $(this).data().index;
    var lx=$(this).data().lx;
    if(lx=='JY'){
        location.href='./result1.html';
    }else{
        location.href='./result2.html';
    }
    sessionStorage.setItem('data',JSON.stringify(listData[index]));
   
})